# -*- coding: utf-8 -*-
# @Author : HaleShi
# @Time : 2023-05-24
# @File : 5_use_jar.py

import uuid
import subprocess

function_id = "backupKeywords"
body = '{"keyword":"内存条"}'
uid = str(uuid.uuid4()).replace("-", "")

cmd = f"java -jar  unidbg-0.9.7.jar {function_id} '{body}' {uid}"
signature = subprocess.check_output(cmd, shell=True, cwd="unidbg_parent_jar")
data_string = signature.strip().decode('utf-8').split("\n")[-1]
print(data_string)
